package cn.selfiot.iotman.model.mqtt;

import cn.selfiot.iotman.model.MqttProjectConstants;

/**
 * 连接配置
 *
 * @author hugo
 * @since 2020/8/1
 */
public class ConnParamsModel {
    private Integer connectionTimeout = 600;
    private Integer keepAlive = 240;
    private Boolean cleanSession = false;
    private Boolean reconnection = true;
    private Integer maxInflight = 1000;
    private String mqttVersion = (String) MqttProjectConstants.MQTT_VER[0].getValue();
    
    public Integer getConnectionTimeout() {
        return connectionTimeout;
    }
    
    public void setConnectionTimeout(Integer connectionTimeout) {
        this.connectionTimeout = connectionTimeout;
    }
    
    public Integer getKeepAlive() {
        return keepAlive;
    }
    
    public void setKeepAlive(Integer keepAlive) {
        this.keepAlive = keepAlive;
    }
    
    public Boolean getCleanSession() {
        return cleanSession;
    }
    
    public void setCleanSession(Boolean cleanSession) {
        this.cleanSession = cleanSession;
    }
    
    public Boolean getReconnection() {
        return reconnection;
    }
    
    public void setReconnection(Boolean reconnection) {
        this.reconnection = reconnection;
    }
    
    public Integer getMaxInflight() {
        return maxInflight;
    }
    
    public void setMaxInflight(Integer maxInflight) {
        this.maxInflight = maxInflight;
    }
    
    public String getMqttVersion() {
        return mqttVersion;
    }
    
    public void setMqttVersion(String mqttVersion) {
        this.mqttVersion = mqttVersion;
    }
    
    @Override
    public String toString() {
        return "ConnParamsModel{" +
                "connectionTimeout=" + connectionTimeout +
                ", keepAlive=" + keepAlive +
                ", cleanSession=" + cleanSession +
                ", reconnection=" + reconnection +
                ", maxInflight=" + maxInflight +
                ", mqttVersion='" + mqttVersion + '\'' +
                '}';
    }
}
